package com.itcast.user.feign;

import com.itcast.common.UserOrderDTO;

import com.itcast.user.feign.fallback.OrderFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "order-service",fallback = OrderFeignFallback.class)
public interface OrderFeign {


    @GetMapping("/order/{username}")
    public List<UserOrderDTO> getOrders(@PathVariable("username") String username);
}
